package com.ml.mall.mapper.company;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ml.mall.entity.company.SysCompanyBusinessBackground;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

@Repository
public interface SysCompanyBusinessBackgroundMapper extends BaseMapper<SysCompanyBusinessBackground> {
    /**
     * @description    :通过公司自定义id查询业务信息
     * @author         :zxm
     * @date           :2021/5/14
    **/
    @Select("select * from sys_company_business_background where company_id=#{companyId} ")
    SysCompanyBusinessBackground selectByCompanyId(@Param("companyId") Long companyId);

    /**
     * @description    :通过公司自定义id修改公司业务描述
     * @author         :zxm
     * @date           :2021/5/17
    **/
    @Update("update sys_company_business_background set description=#{background.description} where company_id = #{background.companyId} ")
    int updateByCompanyId(@Param("background") SysCompanyBusinessBackground sysCompanyBusinessBackground);
}